home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / utilities / aga / agaasststuff4.lha / ppshow / rtpatch / RTPatch.doc < prev    next >
Encoding:
Text File  |  1993-09-21  |  16.7 KB  |  403 lines

  1.  
  2.                       *********************************
  3.  
  4.                          RTPatch 1.2
  5.  
  6.                          The ReqTools Patcher
  7.  
  8.                          (c) 1992-1993 Nico François
  9.  
  10.                       *********************************
  11.  
  12.  
  13. Preface
  14. =======
  15.  
  16. The programs and files in this distribution are freely distributable, but are
  17. also copyright (c) Nico François.  They may be freely distributed as long as
  18. no more than a nominal fee is charged to cover time and copying costs.
  19.    No commercial usage is permitted without written permission from the
  20. author.  Everything in this distribution must be kept together, in original
  21. unmodified form.
  22.    The above is generally known as freeware.
  23.  
  24.    If you have suggestions or remarks about this program, or if you find
  25. any bugs, please let me know.
  26.  
  27.    Contacting the author:
  28.  
  29.      Fido:     2:292/603.10 (Nico Francois)
  30.  
  31.      Internet: nico@augfl.be
  32.  
  33.      Mail:     Nico François
  34.                Corbielaan 13
  35.                B-3060 Bertem
  36.                BELGIUM
  37.  
  38.    If you can please use e-mail.  That way you'll stand a much better chance
  39. of getting a reply quickly.
  40.  
  41.  
  42. Contents
  43. ========
  44.  
  45. 1. Introduction
  46.  
  47. 2. Usage
  48.  
  49. 3. Compatibility
  50.  
  51. 4. Controlling RTPatch
  52.  
  53.  
  54. 1. Introduction
  55. ===============
  56.  
  57.    RTPatch is a small program that will re-route functions from most popular
  58. requester libraries to ReqTools.  Libraries currently supported are Arp, Req
  59. and Asl.  RTPatch will also patch some functions in Intuition to give you
  60. improved system requesters.
  61.  
  62.    The patches RTPatch makes are these:
  63.  
  64.      o Intuition  : AutoRequest and EasyRequest (on 2.0) are patched so
  65.                     normal system requesters, like 'Insert Disk...'
  66.                     requesters, will be replaced by ReqTools EZRequesters.
  67.                     They will appear near the mouse pointer and respond to
  68.                     many keyboard shortcuts.  On 2.0 OpenScreenTagList() is
  69.                     also patched to always open a new-look 3D screen.  This
  70.                     will make for example CygnusEd 2.12 open a nice new-look
  71.                     screen.  You may also ask RTPatch to patch OpenScreen()
  72.                     to open _all_ screens with a 3D look.  Beware however
  73.                     that this makes a lot of old programs look ugly!
  74.      o req.library: File requester, font requester, palette requester,
  75.                     string requester and integer requester are replaced by
  76.                     ReqTools requesters.
  77.      o arp.library: File requester is replaced by ReqTools file requester.
  78.      o asl.library: Currently only file requester is replaced by ReqTools
  79.                     file requester.  Font and screen mode requesters are not
  80.                     patched yet.
  81.  
  82.    RTPatch uses an intelligent patch mechanism.  It will only patch a
  83. library when it is actually opened.  This means that if you never use the
  84. arp.library (for example) it will not be patched and, more importantly, it
  85. will not unnecessaryly be loaded into memory!  If you do run a program that
  86. uses Arp and you quit it, it will close Arp.  RTPatch will then allow the
  87. patched Arp to be expunged from memory.  If Arp is reloaded again later it
  88. will be re-patched.  Note that RTPatch patches exec.library/OpenLibrary() and
  89. exec.library/OldOpenLibrary() to accomplish all this.
  90.  
  91.    RTPatch is a 100% assembly program, for maximum efficiency.  It only
  92. takes about 4.5K of memory once installed (excluding memory occupied by
  93. reqtools.library).  It uses *NO* processor time while installed.
  94.  
  95.  
  96. 2. Usage
  97. ========
  98.  
  99.    RTPatch can be used from Workbench and from the Shell (CLI).
  100.  
  101.    Shell usage:
  102.    ~~~~~~~~~~~~
  103.      RTPatch 1.2 © 1992-1993 Nico François
  104.      Usage: RTPatch [NOREQ] [NOASL] [NOARP] [NOINTUITION]
  105.                     [OPENSCRPATCH] [NOOPENSCRTAGPATCH] [NOFILEREQPATCH]
  106.  
  107.    Explanation of options:
  108.  
  109.       NOREQ             : Do not patch req.library.
  110.       NOASL             : Do not patch asl.library.
  111.       NOARP             : Do not patch arp.library.
  112.       NOINTUITION       : Do not patch intuition.library.
  113.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  114.                           screens will open with a 3D look.  Only use this
  115.                           option on Kickstart 2.0 and higher!
  116.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  117.                           intuition.library.
  118.       NOFILEREQPATCH    : Do not patch any file requester functions.
  119.  
  120.    Workbench usage:
  121.    ~~~~~~~~~~~~~~~~
  122.    RTPatch recognizes following tooltypes:
  123.  
  124.       NOREQ             : Do not patch req.library.
  125.       NOASL             : Do not patch asl.library.
  126.       NOARP             : Do not patch arp.library.
  127.       NOINTUITION       : Do not patch intuition.library.
  128.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  129.                           screens will open with a 3D look.  Only use this
  130.                           tooltype on Kickstart 2.0 and higher!
  131.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  132.                           intuition.library.
  133.       NOFILEREQPATCH    : Do not patch any file requester functions.
  134.       QUIET             : Don't open requester informing patches have been
  135.                           installed.  Set this tooltype if you intend to drag
  136.                           RTPatch to your WbStartup drawer.
  137.  
  138. NOTE: Run RTPatch when *NO* program has req.library, asl.library or
  139.       arp.library open!  RTPatch will complain if one of these libraries
  140.       is in use and will refuse to install or remove patches.  Running
  141.       RTPatch in your user-startup or from your WbStartup should be ok.
  142.  
  143. WARNING: Asl V38 (distributed with Workbench 2.1) always keeps its library
  144.          open count at 0.  It does this so ramlib will always call its
  145.          Expunge() function when memory is low.  This does however mean
  146.          RTPatch cannot see if this library is in use or not.  So you must
  147.          be very careful not to install or remove RTPatch when you have a
  148.          program running that uses Asl.  If you are still using Workbench 1.3
  149.          or 2.0 there is no problem.
  150.  
  151.  
  152. 3. Compatibility
  153. ================
  154.  
  155.    RTPatch supports all basic requester functions and options.  Other
  156. supported things that are worth mentioning:
  157.  
  158.      arp.library (V39)
  159.      ~~~~~~~~~~~~~~~~~
  160.      o File callback function (FRF_DoWildFunc).  The A4 global data register
  161.        is valid when this callback function is called (documented feature).
  162.      o Message callback function (FRF_DoMsgFunc) for requesters which share
  163.        their IDCMP port with the parent window.
  164.      o Save mode (FRF_DoColor flag).
  165.      o Shared IDCMP with parent window or new IDCMP (FRF_NewIDCMP flag).
  166.      o 'Empty filename is ok' behaviour is supported.
  167.  
  168.      asl.library (V36/V38-V40)
  169.      ~~~~~~~~~~~~~~~~~~~~~~~~~
  170.      o File callback function/hook (FRF_DOWILDFUNC and ASLFR_FilterFunc tag).
  171.        The A4 global data register is valid when this callback function is
  172.        called for maximum compatibility (undocumented feature of Asl V36).
  173.      o Intuition message callback function/hook (FRF_DOMSGFUNC and
  174.        ASLFR_IntuiMsgFunc tag) for requesters with shared IDCMP.
  175.      o Multi-selection (FRB_DOMULTISELECT flag or ASLFR_DoMultiSelect tag).
  176.      o Directory requester, no files. (FRF_DRAWERSONLY flag or
  177.        ASLFR_DrawersOnly tag).
  178.      o Save mode (FRF_DOSAVEMODE flag or ASLFR_DoSaveMode tag).
  179.      o Shared IDCMP with parent window or new IDCMP (FRF_PRIVATEIDCMP flag
  180.        or ALSFR_PrivateIDCMP tag).
  181.      o Putting to sleep of parent window (ASLFR_SleepWindow tag).
  182.      o Font for requester (ASLFR_TextAttr tag).  Note that if a proportional
  183.        font is supplied it will be rejected by the ReqTools file requester.
  184.      o Pattern gadget (FRF_DOPATTERNS flag or ASLFR_DoPatterns tag).
  185.      o 'Empty filename is ok' behaviour is supported to ensures compatibility
  186.        with e.g. AssignX, PageStream 2.2 and no doubt many other programs.
  187.      o Undocumented fields in file requester structure are filled in, so even
  188.        "dirty" programs will work.
  189.      o Accept and reject patterns (ASLFR_AcceptPattern/ASLFR_RejectPattern).
  190.  
  191.      req.library (V2)
  192.      ~~~~~~~~~~~~~~~~
  193.      o Multi-selection.
  194.      o Buffers for file and font requester.
  195.      o Directory requester (no files).
  196.      o Save mode (FRQSAVINGM flag).
  197.      o Minimum and maximum value of GetLong() requester.
  198.  
  199.      Additional enhancements
  200.      ~~~~~~~~~~~~~~~~~~~~~~~
  201.      o Buffered directories for Asl file requester.
  202.  
  203.  
  204.      Following things are NOT supported (yet?):
  205.                           ¯¯¯
  206.      arp.library
  207.      ~~~~~~~~~~~
  208.      o FRF_NewWindFunc and FRF_AddGadFunc/FRF_GEventFunc callback functions
  209.        are not called.  As far as I can tell nobody ever used the latter two
  210.        and the former function is certainly not used a lot.
  211.        In short: this should not pose any problems.
  212.  
  213.      asl.library
  214.      ~~~~~~~~~~~
  215.      o ASLFR_InitialWidth and ASLFR_NegativeText tags are ignored.
  216.      o FRB_REJECTICONS flag and ASLFR_RejectIcons tag are ignored.
  217.      o FRB_FILTERDRAWERS flag and ASLFR_FilterDrawers tag are ignored.
  218.  
  219.      req.library
  220.      ~~~~~~~~~~~
  221.      o Timeout and abort mask (req.library requester will be used).
  222.      o freq->frq_Hide is ignored (freq->frq_Show is however supported).
  223.      o TR_KeyMask is not completely supported.  If it is not 0xffff
  224.        (no qualifers) the requester will only respond to Left Amiga V/B.
  225.        This should suffice in most cases however.
  226.  
  227.    If you find any compatibility problems let me know.  Please give a detailed
  228. description of the problem.  Not 'RTPatch doesn't work with NeatProg',
  229. but more like: 'when I do this and this in NeatProg ... doesn't work".
  230.  
  231.  
  232. 4. Controlling RTPatch
  233. ======================
  234.  
  235.    From version 1.1 on RTPatch's message port can be used to control certain
  236. patches from an external program.
  237.  
  238.    The message port is called 'RTPatch.rendezvous' and looks like this:
  239.  
  240.    struct RTPatchPort {
  241.       /* PRIVATE FIELDS */
  242.       struct MsgPort rtport_port;
  243.       ULONG rtport_version;
  244.       /* PUBLIC */
  245.       UWORD rtport_easyreqautocancel;
  246.       UWORD rtport_skipeasyreqpatch;
  247.       UWORD rtport_skipopenscrpatch;
  248.       };
  249.  
  250.    Set the rtport_autocancel field to non-zero to make easy requesters cancel
  251. themselves automatically.  The rtport_skipeasyreqpatch field can be used to
  252. temporarily disable the patch for EasyRequestArgs().  Note that the
  253. rtport_easyreqautocancel field will be ignored if the rtport_skipeasyreqpatch
  254. field is non-zero (TRUE).  RTPatch must have been installed _without_ the
  255. NOINTUITION argument (default).
  256.  
  257.    Set the rtport_skipopenscrpatch field to non-zero to temporarily disable
  258. the OpenScreen() patch.  This will of course only work if the OPENSCRPATCH
  259. argument was used (not the default!).
  260.  
  261.    To change these fields simply do a FindPort() for 'RTPatch.rendezvous' and
  262. change the fields like this:
  263.  
  264.    Forbid();
  265.    if (rtport = (struct RTPatchPort *)FindPort ("RTPatch.rendezvous")) {
  266.       rtport->rtport_easyreqautocancel = TRUE;
  267.       }
  268.    Permit();
  269.    if (!rtport) Message ("RTPatch not found!");
  270.    else Message ("Easy requesters will now be canceled!");
  271.  
  272.    Note that you absolutely _must_ use the Forbid()/Permit() pair since
  273. RTPatch can quit at any time.
  274.  
  275.                                                        Enjoy.
  276.  
  277.  
  278.                                PROGRAM HISTORY:
  279.  
  280. *****************************************************************************
  281. RELEASE 0.9ß
  282.  
  283.     o First BETA release.
  284.  
  285. *****************************************************************************
  286. RELEASE 0.91ß
  287.  
  288.     o Bug fixes: Req GetLong requester no longer returns FALSE when you enter
  289.       the value 0 and Req file requester now properly returns full pathname.
  290.     o Now correctly patches AutoRequest when run on Kickstart 1.2/1.3.
  291.  
  292. *****************************************************************************
  293. RELEASE 1.0
  294.  
  295.     o First "real" release, big improvement over previous beta versions.
  296.     o Fixed some small bugs.
  297.     o Now only patches libraries when they are actually opened.  This saves
  298.       oodles of memory, especially when you never or rarely use certain
  299.       libraries!  Also allows patched libraries to be expunged from memory
  300.       unlike many other patchers.
  301.     o In conjunction with ReqTools V38 empty directories are now allowed for
  302.       improved compatibility.  This makes it e.g. possible to use AssignX.
  303.     o Asl (V36-V38) library is now also patched (file requester only).
  304.     o Command line arguments/icon tooltypes to set some options.
  305.  
  306. *****************************************************************************
  307. RELEASE 1.0a
  308.  
  309.     o ASLFR_AcceptPattern and ASLFR_RejectPattern tags are now supported.
  310.     o Req TextRequest() patch now handles textrequests without gadgets.
  311.       An 'Ok' gadget will be added by RTPatch.
  312.     o Bug fixed: Asl callback hook (filter function) is now only called for
  313.       files, not for directories as well.  The callback hook also makes
  314.       sure the fr_Drawer field of the Asl requester is pointing to the
  315.       current directory (only with ReqTools release 2.0b or higher!).
  316.     o Now allows you to also patch OpenScreen() to force _all_ screens to
  317.       open with a 3D look. This is not default because it makes a lot of old
  318.       programs look ugly.
  319.       WARNING: NOOPENSCRPATCH switch has been changed to NOOPENSCRTAGPATCH!
  320.     o OpenScreenTagList() patch tweeked a bit.
  321.     o On Kickstart 2.0 or higher RTPatch will now set the RNF_WILDSTAR flag
  322.       in the DOS rootnode. This allows you to use '*' as a wildcard.
  323.  
  324. *****************************************************************************
  325. RELEASE 1.0b
  326.  
  327.     o OpenScreenTagList() patch tweeked a bit more :)  Will not force a 3D
  328.       look if no taglist was supplied. Will also leave the picking of the
  329.       pens completely up to Intuition. Patch made more future-compatible :)
  330.     o Bug fix: Arp message callback function didn't work.  This caused TxEd
  331.       Plus 2.2 to crash.  Thanks to Bill Sorensen for reporting this bug.
  332.     o Fixed problem with AutoRequest() and EasyRequest() patches.  Requesters
  333.       weren't opened on the default public screen if the window argument was
  334.       NULL.  They were opened on the screen of the window in pr_WindowPtr.
  335.       Thanks to Roger Nordin for reporting this.
  336.  
  337. *****************************************************************************
  338. RELEASE 1.1
  339.  
  340.     o RTPatch's message port is now documented and allows external program
  341.       to change the behaviour of some patches.  It is now possible to let
  342.       RTPatch automatically cancel easy requesters and to temporarily switch
  343.       off the OpenScreen() patch.
  344.     o Bug fix: OpenScreen() patch now recognizes the NS_EXTENDED flag.
  345.       Fixes problems with DPaint, DirOpus and PowerVisor.
  346.     o Handling of ASLFR_DrawersOnly tag was broken.  Fixed.
  347.     o Fixed bug in AutoRequest() patch (no longer worked on Kickstart 1.3).
  348.     o OpenLibrary() patch rewritten for (hopefully) better compatibility
  349.       with buggy programs.  Now keeps _all_ registers 100% compatible with
  350.       normal OpenLibrary() call.
  351.  
  352. *****************************************************************************
  353. RELEASE 1.1a
  354.  
  355.     o Clears EZREQF_NORETURNKEY for single-button EZRequesters (latest
  356.       release of ReqTools libraries no longer clear this automatically).
  357.  
  358. *****************************************************************************
  359. RELEASE 1.1b
  360.  
  361.     o Now properly initializes the fr_Pattern field of an emulated Asl
  362.       file requester structure.
  363.     o Fixed bug in req.library TextRequest() emulation.  Printf style
  364.       arguments were not correctly emulated.  This does not fix the infamous
  365.       CygnusEd bug that occurs when a search for '%s' fails (for example).
  366.     o Fixed small bug in single-button detection code in req.library
  367.       TextRequest() emulation.
  368.  
  369. *****************************************************************************
  370. RELEASE 1.1c
  371.  
  372.     o OpenLibrary() patch fixed.  Now checks the return code from
  373.       SetFunction() rather than directly peeking into the library's jump
  374.       table. Should work perfectly with SetMan now.
  375.  
  376. *****************************************************************************
  377. RELEASE 1.2
  378.  
  379.     o New argument: 'NOFILEREQPATCH'.  Allows you to switch off the patching
  380.       of all file requester functions.
  381.     o Bug fix: EasyRequestArgs() emulation had a bug in the taglist
  382.       generation.  Amazing this actually worked before ;-)
  383.     o AutoRequest() patch will now check the body text is is passed to
  384.       sniff out possible emulation problems.  In such a case the original
  385.       AutoRequest() is called.  This fixes a problem with the DiskSalv 2
  386.       device info requester.
  387.       
  388. *****************************************************************************
  389.  
  390. RTPatch 1.2 written by Nico François (Yes, Nico is my first name :-)
  391.  
  392.  
  393. "Is that you Mo-Dean?
  394.  It's me Mo-Dean
  395.  The Interdimensional outer space being" - The B-52's
  396.  
  397.  
  398. (c) 1992-1993 Nico François
  399.  
  400.                                    //
  401.                        Thanks to \X/ Amiga for being the best computer ever!
  402.  
  403.